In [13]:
import plotly
plotly.offline.init_notebook_mode()
import cufflinks as cf
cf.go_offline()
cf.set_config_file(theme='ggplot')
from plotly.graph_objs import Bar,Layout, Figure,Data,Scattermapbox,Marker,Scatter,Box
In [2]:
import pandas as pd
import numpy as np

Box plot

In [4]:
import string
In [5]:
N = 100
y_vals = {}
for letter in list(string.ascii_uppercase):
     y_vals[letter] = np.random.randn(N)+(3*np.random.randn())
In [7]:
df=pd.DataFrame(y_vals)
In [10]:
df.head(2)
Out[10]:
A B C D E F G H I J ... Q R S T U V W X Y Z
0 0.751818 -0.734486 2.18185 3.361464 -0.022562 -0.523472 -5.685544 3.870556 5.080107 4.271300 ... -3.731294 -0.660084 -7.990284 -6.094348 -2.625269 -1.551821 -7.305295 -0.365306 3.969296 -1.272402
1 1.668271 -2.229086 1.40716 3.277071 0.933513 0.220614 -6.137809 3.229383 3.052586 3.443645 ... -3.122820 -1.157002 -5.244890 -4.538380 -3.235980 -0.470701 -8.324971 -0.780766 5.105375 -2.793900

2 rows × 26 columns

In [28]:
data = []
In [29]:
for col in df.columns:
    data.append(Box( y=df[col], name=col, showlegend=False ) )
In [30]:
data.append( Scatter( x = df.columns, y = df.mean(), mode='lines', name='mean' ) )
In [31]:
plotly.offline.iplot(Figure(data=data))
In [34]:
df.iplot(kind='box')